{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Comparing Data\n",
    "You'll often want to compare data in your dataset, to see if you can discern trends or relationships.\n",
    "\n",
    "## Univariate Data\n",
    "*Univariate* data is data that consist of only one variable or feature. While it may initially seem as though there's not much we can do to analyze univariate data, we've already seen that we can explore its distribution in terms of measures of central tendency and measures of variance. We've also seen how we can visualize this distribution using histograms and box plots.\n",
    "\n",
    "Here's a reminder of how you can visualize the distribution of univariate data, using our student grade data with a few additional observations in the sample:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAD7FJREFUeJzt3XuQnXV9x/H3RyMGJIKQFU1AVlrGu3jZqqhVEccZQA2MOINSihaLt6ladSTVKuhUBetUnVahGRlNFRWMF/BSB4p4q0rdBCzF0IEil5gIqxguERXk2z/Ok3rc7nLOJnuy4cf7NZPZc/k9z/M7O8n7PPs7e3JSVUiS7vnus9ATkCTND4MuSY0w6JLUCIMuSY0w6JLUCIMuSY0w6NopJbkmyfNGuP/bkhwwT/t6W5KPdZfHk1SSRfO074d1c73vfOxPbTPomrMkxyS5OMmWJDd2l1+bJDvB3J6T5K4ugrcl2ZDknCR/0j+uqnavqquH2NeGQcesqvdW1Su3d+7dMf/giayqruvm+rv52L/aZtA1J0neDHwY+HvgIcA+wKuBZwC7zLLNjj673FhVuwNLgKcBVwDfSXLofB9ovs7Epflg0DW0JHsA7wZeW1VrqurW6rmkqo6tqt904z6R5PQkX0uyBTgkyRFJLklyS5Lrk5wybd/HJbk2yS+SvH3affdJsjLJ/3T3n5Nkr0Hz7ea2oareCXwMO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llSVZs3SbJ25P8d5J/Ax7Rd/sfJfl6d+b/nSSP3KGPThrAMxW15DHAuru5/2Dg8VV1U3eWflRV3ZJkKfCDJOcBT6J3Vv9Eev8+1gFru+1XAa+uqiuTPBX4KL0nEWmnYNDVrCQfAZ4J/Bb4CHBBVd209W7gvUmeBdwFLAf2Af4U+GJV/arbx3nd192BpwOf663sAHD/HfRQpKEYdLXkcuDFW69U1eu6s+/J7qYtfWOPBcaAJ1fVHUmuARZv3XSGfd8H2FxVT5j3WUvzxDV0teQbwOIkr+m7bbdZxu4B3NjF/BBg/+72bwNHJdk1yRLghQBVdQvwkyQvgd4LsEkOGsmjkLaRQVczqve25yOBZyf5SZL/AFYDJ80w/CxgIskkvbP1K7p9rAPOBi4FPg98p2+bY4ETkvyI3k8DK5B2Ir71X5Ia4Rm6JDXCoEtSIwy6JDXCoEtSIwy6JDXCoEtSIwy6JDXifwEYjyUL9Mw3FQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAEt5JREFUeJzt3X+MZWd93/H3h7UBxxPWDaYTd710iLDapl4F8Ig4paruGCIZ27IjxbSLnIRFoFUiKE7liKz5wwhLVbEUIEQg0BbTGIoYI0PUjddphIAp8AcOs8Z4bRaULd3WY7sYMCyMY0y3fPvHvenOjGd978w9OzM8835JV3t+POfc7z73uZ85c+bcc1NVSJLa8pzNLkCS1D3DXZIaZLhLUoMMd0lqkOEuSQ0y3CWpQYa7JDXIcJekBhnuktSgczbriS+88MKamprarKffMp588knOP//8zS5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uB94yuJXDAeBzVXUJ8LnB/HZxI3BsyfxtwPsGffED+re22C7eD/zXqvqnwK/R75dtNzaS7ALeBkxX1aX0L+TYy/YeG2tmuG+gqnqsqu4bTP+Y/pt3F8tv33AH8FubU+HGSnIxcDXwkcF8gCvo38ICtldfvAD4V/SvPKOqflpVP2Sbjg36F3ucN/jczC8Aj7FNx8Z6Ge6bZHDnzJcD9wKTVfUY9H8AAP9w8yrbUH8KvB342WD+hcAPB7ewgNVvddGqXwG+C/ynwWmqjyQ5n204NqrqEeBPgP9FP9RPAkfYvmNjXQz3TZBkAvg08IdV9aPNrmczJLkGeLyqjixdvErT7XI51znAK4APVdXLgSfZBqdgVjP4u8J1wEuAfwScT/+utCttl7GxLob7BktyLv1g/0RVfWaw+DtJLhqsvwh4fLPq20CvAq5NcoL+nUavoH8kf8HgV3FY/VYXrVoAFqrq3sH8XfTDfjuOjdcA/6OqvltV/wf4DPAv2L5jY10M9w00OKd8O3Csqt67ZNXS2ze8AfgvG13bRquqm6vq4qqaov/Hss9X1Q3AF+jfwgK2SV8AVNX/Bh5O8k8Gi14NfINtODbon465PMkvDN4zf98X23JsrJcfYtpASf4l8CXgKKfPM7+D/nn3TwEvpj+wX1dVz7jxWquS9IA/qqprkvwK/SP5XwK+BvxOVT29mfVtlCQvo//H5ecC3wbeSP8AbNuNjSTvAv4N/SvMvga8mf459m05NtbDcJekBnlaRpIaZLhLUoMMd0lqkOEuSQ0y3CWpQYa7JDXIcJekBhnuktSg/wdhkK+0ugEY6wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "           Grade\n",
      "count  15.000000\n",
      "mean   51.533333\n",
      "std    24.642781\n",
      "min     5.000000\n",
      "25%    41.000000\n",
      "50%    50.000000\n",
      "75%    66.000000\n",
      "max    95.000000\n",
      "median: 50.0\n"
     ]
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "plt.figure()\n",
    "df['Grade'].plot( kind='box', title='Grade Distribution')\n",
    "plt.figure()\n",
    "df['Grade'].hist(bins=9)\n",
    "plt.show()\n",
    "print(df.describe())\n",
    "print('median: ' + str(df['Grade'].median()))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Bivariate and Multivariate Data\n",
    "It can often be useful to compare *bivariate* data; in other words, compare two variables, or even more (in which case we call it *multivariate* data).\n",
    "\n",
    "For example, our student data includes three numeric variables for each student: their salary, the number of hours they work per week, and their final school grade. Run the following code to see an enlarged sample of this data as a table:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Name</th>\n",
       "      <th>Salary</th>\n",
       "      <th>Hours</th>\n",
       "      <th>Grade</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Dan</td>\n",
       "      <td>50000</td>\n",
       "      <td>41</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Joann</td>\n",
       "      <td>54000</td>\n",
       "      <td>40</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Pedro</td>\n",
       "      <td>50000</td>\n",
       "      <td>36</td>\n",
       "      <td>46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Rosie</td>\n",
       "      <td>189000</td>\n",
       "      <td>17</td>\n",
       "      <td>95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Ethan</td>\n",
       "      <td>55000</td>\n",
       "      <td>35</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Vicky</td>\n",
       "      <td>40000</td>\n",
       "      <td>39</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Frederic</td>\n",
       "      <td>59000</td>\n",
       "      <td>40</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Jimmie</td>\n",
       "      <td>42000</td>\n",
       "      <td>45</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Rhonda</td>\n",
       "      <td>47000</td>\n",
       "      <td>41</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Giovanni</td>\n",
       "      <td>78000</td>\n",
       "      <td>35</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Francesca</td>\n",
       "      <td>119000</td>\n",
       "      <td>30</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>Rajab</td>\n",
       "      <td>95000</td>\n",
       "      <td>33</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>Naiyana</td>\n",
       "      <td>49000</td>\n",
       "      <td>38</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>Kian</td>\n",
       "      <td>29000</td>\n",
       "      <td>47</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>Jenny</td>\n",
       "      <td>130000</td>\n",
       "      <td>24</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Name  Salary  Hours  Grade\n",
       "0         Dan   50000     41     50\n",
       "1       Joann   54000     40     50\n",
       "2       Pedro   50000     36     46\n",
       "3       Rosie  189000     17     95\n",
       "4       Ethan   55000     35     50\n",
       "5       Vicky   40000     39      5\n",
       "6    Frederic   59000     40     57\n",
       "7      Jimmie   42000     45     42\n",
       "8      Rhonda   47000     41     26\n",
       "9    Giovanni   78000     35     72\n",
       "10  Francesca  119000     30     78\n",
       "11      Rajab   95000     33     60\n",
       "12    Naiyana   49000     38     40\n",
       "13       Kian   29000     47     17\n",
       "14      Jenny  130000     24     85"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "df[['Name', 'Salary', 'Hours', 'Grade']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's suppose you want to compare the distributions of these variables. You might simply create a boxplot for each variable, like this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmwAAAHiCAYAAABVx5AQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xu0pVV5J+rfmyoVbS9oKB2GixBT7QFJpGXHmNPa8ZIomAvaRzvQaa3YJARb6dMHcxqUdDS20tLp6BgalQORI9gGNNpG0tEoIRjDOV4oFLnEGEoEKfFwESXeBXzPH+vbZFFW1S7qtmfVfp4x1ljfer8555rLsSl/e87v26u6OwAAjOtHlnsCAABsncAGADA4gQ0AYHACGwDA4AQ2AIDBCWwAAIMT2IA9WlWdWVX/aSeNdVBVfbOqVk2vP1pVv7Ezxp7G+1BVrdtZ4wErx+rlngDA1lTV9UkeleSuJHcn+dsk5yU5q7t/0N0n3odxfqO7/3JLbbr7S0kevKNznt7v1Ul+orv/zdz4R++MsYGVxwobsCf45e5+SJLHJHl9klOSvH1nvkFV+QUWGJbABuwxuvuO7r4wya8mWVdVh1fVO6rqtUlSVftV1f+sqq9X1e1V9TdV9SNV9c4kByX5s2nL8z9W1cFV1VV1fFV9KclfzdXmw9tjq+pTVXVHVX2gqh4xvdfTqmrj/Pyq6vqq+vmqOirJK5P86vR+n53O37PFOs3rd6rqhqq6parOq6qHTecW57Guqr5UVbdV1Wm79n9dYGQCG7DH6e5PJdmY5KmbnHr5VF+T2TbqK2fN+4VJvpTZSt2Du/u/zvX5uSSHJnn2Ft7uRUn+bZIfy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lSSi3PvFYp5P5nk96vqB0nuTPKSLbSDXaa7u6qem+SNVfUfM/tZ/laSUzK7znjeu5L8WVWtT3JFkr+bxvh0Vb17qt2Q5G/m+vxakrdV1e9k9svLBUk+uws/EvFNB+xm0512x3T3C5d7LgCwp7DCxm5TVW9OcnRm1/cAANvIChsAwODcdAAAMDiBDQBgcAIbAMDgBDYAgMEJbAAAgxPYAAAG9/8DGuL3Ux+osW8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 720x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "\n",
    "df.plot(kind='box', title='Distribution', figsize = (10,8))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Hmm, that's not particularly useful is it?\n",
    "\n",
    "The problem is that the data are all measured in different scales. Salaries are typically in tens of thousands, while hours and grades are in single or double digits.\n",
    "\n",
    "### Normalizing Data\n",
    "When you need to compare data in different units of measurement, you can *normalize* or *scale* the data so that the values are measured in the same proportional scale. For example, in Python you can use a MinMax scaler to normalize multiple numeric variables to a proportional value between 0 and 1 based on their minimum and maximum values. Run the following cell to do this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'sklearn'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-4-3471bd897c79>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      3\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpyplot\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0msklearn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpreprocessing\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mMinMaxScaler\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
      "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'sklearn'"
     ]
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "from matplotlib import pyplot as plt\n",
    "from sklearn.preprocessing import MinMaxScaler\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "# Normalize the data\n",
    "scaler = MinMaxScaler()\n",
    "df[['Salary', 'Hours', 'Grade']] = scaler.fit_transform(df[['Salary', 'Hours', 'Grade']])\n",
    "\n",
    "# Plot the normalized data\n",
    "df.plot(kind='box', title='Distribution', figsize = (10,8))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now the numbers on the y axis aren't particularly meaningful, but they're on a similar scale."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Comparing Bivariate Data with a Scatter Plot\n",
    "When you need to compare two numeric values, a scatter plot can be a great way to see if there is any apparent relationship between them so that changes in the value of one variable affect the value of the other.\n",
    "\n",
    "Let's look at a scatter plot of *Salary* and *Grade*:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZsAAAEWCAYAAACwtjr+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3X+UVeV97/H3Z5hhwKAywmiUwUAKSYq5hOpUibQm0VaxMUCLaUzTSnPp5daYH02agt6sWxvT9irJCo23akrVimkiIqSFZiUhXE1r26hxUMSgSZlqIgNUEAYiBoaB+d4/9jNhMw7zy9nnDHM+r7Vmzdnf/ex9nnMY5jN77+c8WxGBmZlZkarK3QEzMxv+HDZmZlY4h42ZmRXOYWNm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pMuBZKvPn40VgpqRT0v+bzveiIn82BsozCFQoSb8C/CvwDMeuUfwvsus2q4Bzyf6TvT8i9palk2Ui6d3ApyPiKklvJjvSOQN4CvjdiGgrZ/9KRdIMssESI4HngQ+T/YFacT8fkj4LfIBsFOdTwB+QXaOpyJ+NgXDYmJlZ4XwazczMCuewMTOzwjlszMyscA4bMzMrnMPGzMwK57AxKyFJZ0n6mqTnJW2U9Kik33wd+/szSZ8ezD6aFcFhY1Yi6QOB/wg8EhFvjogLyD5A2tClXXV325udzBw2ZqVzKXA4Ir7cWYiIn0TE/5X0+5IelPRPwHckjZH0kKQnJT0jaW7nNpI+I+lHkv4f8NZc/RckfTsdMf2rpLeV9NWZ9cB/QZmVznnAkz2sfycwPSL2pqOb34yIn0oaDzwmaR3Z/GTXkM3SXZ321zl56HLgDyNiq6SLgDvIAs6s7Bw2ZmUi6XbgV4DDwO3AhtzULwL+UtIlZNMJTQDOAn4V+IeI+Fnax7r0fQzZ5JAPZmfrAKgt0Usx65XDxqx0tgDzOxci4vp01NKUSq/m2n4IqAcuiIj2NBv1qM5Nu9l3Fdn9VWYMeq/NBoGv2ZiVzsPAKEnX5WqnnKDt6WT312mX9B7gTan+CPCbkkZLOhV4H0C6F9ELkt4P2WAESe8o5FWYDYDDxqxEIpv1dh7wLkkvSPo+2e2El3TT/KtAo6QmsqOcH6Z9PAk8AGwiuxfRv+a2+RCwUNLTZEdRczEbIjzrs5mZFc5HNmZmVjiHjZmZFc5hY2ZmhXPYmJlZ4Rw2ZmZWOIeNmZkVzmFjZmaF+//QzTJPinCJWwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "# Create a scatter plot of Salary vs Grade\n",
    "df.plot(kind='scatter', title='Grade vs Hours', x='Grade', y='Salary')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Look closely at the scatter plot. Can you see a diagonal trend in the plotted points, rising up to the right? It looks as though the higher the student's grade is, the higher their salary is.\n",
    "\n",
    "You can see the trend more clearly by adding a *line of best fit* (sometimes called a *trendline*) to the plot:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZsAAAEWCAYAAACwtjr+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xt8VdWd9/HPN4CAonJVkYAg4L2KmvFGVdRevFW02lZt62Wcen/qPE9nRNs+T612OtZOa50+gkVrxdaKVmyhPjrWUVFrwRq8UG+tAVQCFJCboBAD+T1/7BU5xEBCyM5Jcr7v1yuvc87aa++z9uGQX9ba67eXIgIzM7M8lRW7AWZm1vk52JiZWe4cbMzMLHcONmZmljsHGzMzy52DjZmZ5c7BxqwVSXpL0qeK3Y6W6Mhtt/bPwcZKhqSzJT0n6X1JS9LzyyWp2G1rLZI+KelPklZJWi7pWUn/UOx2mTnYWEmQ9A3gFuCHwG7ArsClwGhgu83s06XNGtgK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y22V26u6bj1d88dCJwaUS8KelwYDxZgDMrOgcbsyKRdCvwSeBD4FbgsYJbvwj4vqRjyG4nNAjYFTga+G1EfJCOMS099iK7OeRvstE6ALq30amYNcnBxqztvAqcWf8iIq5IvZbKVPR+Qd0vAwOAQyOiNt2Nukf9ro0cu4xsfZVRrd5qs1bgazZmbecJoIekywrKtt9M3Z3J1teplXQcsEcqfxo4Q1JPSTsCnwNIaxHNk/QFyCYjSDool7MwawEHG7M2Etldb08HjpU0T9KfyZYTHtdI9XuACkmVZL2cN9IxXgDuA14iW4vomYJ9vgxcJOllsl7UWMzaCd/12czMcueejZmZ5c7BxszMcudgY2ZmuXOwMTOz3DnYmJlZ7hxszMwsdw42ZmaWu/8PfO7+Vu+DFiIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "# Create a scatter plot of Salary vs Grade\n",
    "df.plot(kind='scatter', title='Grade vs Salary', x='Grade', y='Salary')\n",
    "\n",
    "# Add a line of best fit\n",
    "plt.plot(np.unique(df['Grade']), np.poly1d(np.polyfit(df['Grade'], df['Salary'], 1))(np.unique(df['Grade'])))\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The line of best fit makes it clearer that there is some apparent *colinearity* between these variables (the relationship is *colinear* if one variable's value increases or decreases in line with the other).\n",
    "\n",
    "### Correlation\n",
    "The apparently colinear relationship you saw in the scatter plot can be verified by calculating a statistic that quantifies the relationship between the two variables. The statistic usually used to do this is *correlation*, though there is also a statistic named *covariance* that is sometimes used. Correlation is generally preferred because the value it produces is more easily interpreted.\n",
    "\n",
    "A correlation value is always a number between ***-1*** and ***1***.\n",
    "- A positive value indicates a positive correlation (as the value of variable *x* increases, so does the value of variable *y*).\n",
    "- A negative value indicates a negative correlation (as the value of variable *x* increases, the value of variable *y* decreases).\n",
    "- The closer to zero the correlation value is, the weaker the correlation between *x* and *y*.\n",
    "- A correlation of exactly zero means there is no apparent relationship between the variables.\n",
    "\n",
    "The formula to calculate correlation is:\n",
    "\n",
    "\\begin{equation}r_{x,y} = \\frac{\\displaystyle\\sum_{i=1}^{n} (x_{i} -\\bar{x})(y_{i} -\\bar{y})}{\\sqrt{\\displaystyle\\sum_{i=1}^{n} (x_{i} -\\bar{x})^{2}(y_{i} -\\bar{y})^{2}}}\\end{equation}\n",
    "\n",
    "**r<sub>x, y</sub>** is the notation for the *correlation between x and y*.\n",
    "\n",
    "The formula is pretty complex, but fortunately Python makes it very easy to calculate the correlation by using the ***corr*** function:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8149286388911882\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000],\n",
    "                   'Hours':[41,40,36,17,35,39,40],\n",
    "                   'Grade':[50,50,46,95,50,5,57]})\n",
    "\n",
    "# Calculate the correlation between *Salary* and *Grade*\n",
    "print(df['Grade'].corr(df['Salary']))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this case, the correlation is just over 0.8; making it a reasonably high positive correlation that indicates salary increases in line with grade.\n",
    "\n",
    "Let's see if we can find a correlation between *Grade* and *Hours*:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Correlation: -0.8109119058459785\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEWCAYAAABrDZDcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl8leWd9/HPLwsJEHYCQsKSxQUXBEV2gaSO0xaKtOjUum+lKrTOOK3Ydp5n2pnpMyMzrW3ZLGotU63WilbrtJ1ak7CpKJugopKELawhEEiAhCTn9/xxDjVYlpCck3OS832/XrzMuc+9/M7tSb7nuq/rXLe5OyIiEr8Sol2AiIhEl4JARCTOKQhEROKcgkBEJM4pCERE4pyCQEQkzikIJO6Y2VYzuybadYjECgWBxBQzu9HMVpnZETPbF/r5fjOzaNcWLqcKIjO7w8xWRKsmiW8KAokZZvaPwE+A/wTOA/oC9wLjgA6n2Sax1Qpsg8wsKdo1SOxTEEhMMLNuwL8A97v7C+5e5UHr3P1md68NrfcLM1toZr83syNAnplNNrN1ZnbYzHaY2fc+te9bzWybmVWY2Xc/9VyCmT1sZiWh5583s56nqXGTmU1p9DjJzPab2RVmlmpmT4f2UWlm75hZ3xacjyFmVhTa1/tmNrXRc0Vmdk+jxye1JszMzWymmW0GNlvQo6EW1iEz22Bmlza3Nml/FAQSK8YAKcDLTVj3JuAHQBdgBXAEuA3oDkwG7jOzaQBmdjGwELgV6A/0AjIb7esbwDRgYuj5g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AAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "r = df['Grade'].corr(df['Hours'])\n",
    "print('Correlation: ' + str(r))\n",
    "\n",
    "# Create a scatter plot of Salary vs Grade\n",
    "df.plot(kind='scatter', title='Grade vs Hours', x='Grade', y='Hours')\n",
    "\n",
    "# Add a line of best fit-\n",
    "plt.plot(np.unique(df['Grade']), np.poly1d(np.polyfit(df['Grade'], df['Hours'], 1))(np.unique(df['Grade'])))\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this case, the correlation value is just under -0.8; meaning a fairly strong negative correlation in which the number of hours worked decreases as the grade increases. The line of best fit on the scatter plot corroborates this statistic.\n",
    "\n",
    "It's important to remember that *correlation* **is not** *causation*. In other words, even though there's an apparent relationship, you can't say for sure that one variable is the cause of the other. In this example, we can say that students who achieved higher grades tend to work shorter hours; but we ***can't*** say that those who work shorter hours do so *because* they achieved a high grade!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Least Squares Regression\n",
    "In the previous examples, we drew a line on a scatter plot to show the *best fit* of the data. In many cases, your initial attempts to identify any colinearity might involve adding this kind of line by hand (or just mentally visualizing it); but as you may suspect from the use of the *numpy.**polyfit*** function in the code above, there are ways to calculate the coordinates for this line mathematically. One of the most commonly used techniques is *least squares regression*, and that's what we'll look at now.\n",
    "\n",
    "Cast your mind back to when you were learning how to solve linear equations, and recall that the *slope-intercept* form of a linear equation lookes like this:\n",
    "\n",
    "\\begin{equation}y = mx + b\\end{equation}\n",
    "\n",
    "In this equation, *y* and *x* are the coordinate variables, *m* is the slope of the line, and *b* is the y-intercept of the line.\n",
    "\n",
    "In the case of our scatter plot for our former-student's working hours, we already have our values for *x* (*Grade*) and *y* (*Hours*), so we just need to calculate the intercept and slope of the straight line that lies closest to those points. Then we can form a linear equation that calculates the a new *y* value on that line for each of our *x* (*Grade*) values - to avoid confusion, we'll call this new *y* value *f(x)* (because it's the output from a linear equation function based on *x*). The difference between the original *y* (*Hours*) value and the *f(x)* value is the *error* between our regression line of best fit and the actual *Hours* worked by the former student. Our goal is to calculate the slope and intercept for a line with the lowest overall error.\n",
    "\n",
    "Specifically, we define the overall error by taking the error for each point, squaring it, and adding all the squared errors together. The line of best fit is the line that gives us the lowest value for the sum of the squared errors - hence the name *least squares regression*.\n",
    "\n",
    "So how do we accomplish this? First we need to calculate the slope (*m*), which we do using this formula (in which *n* is the number of observations in our data sample):\n",
    "\n",
    "\\begin{equation}m = \\frac{n(\\sum{xy}) - (\\sum{x})(\\sum{y})}{n(\\sum{x^{2}})-(\\sum{x})^{2}}\\end{equation}\n",
    "\n",
    "After we've calculated the slope (*m*), we can use is to calculate the intercept (*b*) like this:\n",
    "\n",
    "\\begin{equation}b = \\frac{\\sum{y} - m(\\sum{x})}{n}\\end{equation}\n",
    "\n",
    "Let's look at a simple example that compares the number of hours of nightly study each student undertook with the final grade the student achieved:\n",
    "\n",
    "| Name     | Study | Grade |\n",
    "|----------|-------|-------|\n",
    "| Dan      | 1     | 50    |\n",
    "| Joann    | 0.75  | 50    |\n",
    "| Pedro    | 0.6   | 46    |\n",
    "| Rosie    | 2     | 95    |\n",
    "| Ethan    | 1     | 50    |\n",
    "| Vicky    | 0.2   | 5     |\n",
    "| Frederic | 1.2   | 57    |\n",
    "\n",
    "First, let's take each *x* (Study) and *y* (Grade) pair and calculate *x<sup>2</sup>* and *xy*, because we're going to need these to work out the slope:\n",
    "\n",
    "| Name     | Study | Grade | x<sup>2</sup> | xy   |\n",
    "|----------|-------|-------|------|------|\n",
    "| Dan      | 1     | 50    | 1    | 50   |\n",
    "| Joann    | 0.75  | 50    | 0.55 | 37.5 |\n",
    "| Pedro    | 0.6   | 46    | 0.36 | 27.6 |\n",
    "| Rosie    | 2     | 95    | 4    | 190  |\n",
    "| Ethan    | 1     | 50    | 1    | 50   |\n",
    "| Vicky    | 0.2   | 5     | 0.04 | 1    |\n",
    "| Frederic | 1.2   | 57    | 1.44 | 68.4 |\n",
    "\n",
    "Now we'll sum *x*, *y*, *x<sup>2</sup>*, and *xy*:\n",
    "\n",
    "| Name     | Study | Grade | x<sup>2</sup> | xy   |\n",
    "|----------|-------|-------|------|------|\n",
    "| Dan      | 1     | 50    | 1    | 50   |\n",
    "| Joann    | 0.75  | 50    | 0.55 | 37.5 |\n",
    "| Pedro    | 0.6   | 46    | 0.36 | 27.6 |\n",
    "| Rosie    | 2     | 95    | 4    | 190  |\n",
    "| Ethan    | 1     | 50    | 1    | 50   |\n",
    "| Vicky    | 0.2   | 5     | 0.04 | 1    |\n",
    "| Frederic | 1.2   | 57    | 1.44 | 68.4 |\n",
    "| **&Sigma;**      | **6.75**  | **353**   | **8.4025**| **424.5**  |\n",
    "\n",
    "OK, now we're ready to calculate the slope for our *7* observations:\n",
    "\n",
    "\\begin{equation}m = \\frac{(7\\times 424.5) - (6.75\\times353)}{(7\\times8.4025)-6.75^{2}}\\end{equation}\n",
    "\n",
    "Which is:\n",
    "\n",
    "\\begin{equation}m = \\frac{2971.5 - 2382.75}{58.8175-45.5625}\\end{equation}\n",
    "\n",
    "So:\n",
    "\n",
    "\\begin{equation}m = \\frac{588.75}{13.255} \\approx 44.4172\\end{equation}\n",
    "\n",
    "Now we can calculate *b*:\n",
    "\n",
    "\\begin{equation}b = \\frac{353 - (44.4172\\times6.75)}{7}\\end{equation}\n",
    "\n",
    "Which simplifies to:\n",
    "\n",
    "\\begin{equation}b = \\frac{53.18389}{7} = 7.597699\\end{equation}\n",
    "\n",
    "Now we have our linear function:\n",
    "\n",
    "\\begin{equation}f(x) = 44.4172x + 7.597699\\end{equation}\n",
    "\n",
    "We can use this for each *x* (Study) value to calculate the *y* values for the regression line (*f(x)*), and we can subtract the original *y* (Grade) from these to calculate the error for each point:\n",
    "\n",
    "| Name     | Study | Grade | *f(x)* | Error |\n",
    "|----------|-------|-------|------|------ |\n",
    "| Dan      | 1     | 50    |52.0149 |2.0149 |\n",
    "| Joann    | 0.75  | 50    |40.9106 |-9.0894|\n",
    "| Pedro    | 0.6   | 46    |34.2480 |-11.752|\n",
    "| Rosie    | 2     | 95    |96.4321 |1.4321 |\n",
    "| Ethan    | 1     | 50    |52.0149 |2.0149 |\n",
    "| Vicky    | 0.2   | 5     |16.4811 |11.4811|\n",
    "| Frederic | 1.2   | 57    |60.8983 |3.8983 |\n",
    "\n",
    "As you can see, the *f(x)* values are mostly quite close to the actual *Grade* values, and the errors (which when we're comparing estimated values from a function with actual known values we we often call *residuals*) are generally pretty small.\n",
    "\n",
    "Let's plot the least squares regression line with the actual values:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3XeYVPX1x/H3QUGqCgJKX1uigiJF7BRFxQaoWFCx/DCYRLEbjSmixkRFRWwxRIwlijX2ik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gafMbKqZTQQOAgYAQ4B3C4rUwM3AWwR3y1scN/3VwBVm9iXBJaVj3H0pwa0l/5PWJRDZDrqaq0iEwvMoJhEcQvtT1PGIxNMWhEhEwjsWTgceUnKQbKQtCBERSUpbECIikpQShIiIJKUEISIiSSlBiIhIUkoQIiKS1P8DXSFE4elkDZEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic'],\n",
    "                   'Study':[1,0.75,0.6,2,1,0.2,1.2],\n",
    "                   'Grade':[50,50,46,95,50,5,57],\n",
    "                   'fx':[52.0159,40.9106,34.2480,96.4321,52.0149,16.4811,60.8983]})\n",
    "\n",
    "# Create a scatter plot of Study vs Grade\n",
    "df.plot(kind='scatter', title='Study Time vs Grade Regression', x='Study', y='Grade', color='red')\n",
    "\n",
    "# Plot the regression line\n",
    "plt.plot(df['Study'],df['fx'])\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this case, the line fits the middle values fairly well, but is less accurate for the outlier at the low end. This is often the case, which is why statisticians and data scientists often *treat* outliers by removing them or applying a threshold value; though in this example there are too few data points to conclude that the data points are really outliers.\n",
    "\n",
    "Let's look at a slightly larger dataset and apply the same approach to compare *Grade* and *Salary*:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "slope: 1516.1378856076408\n",
      "y-intercept: -5731.639038313754\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZsAAAEWCAYAAACwtjr+AAAABH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XwRDPrvwRsGxELUuvmGxGxWFJfYJqkKWTXJzuM7Crd3dP+ai8eOh44LiJelrQT8EeyBGdWck42ZiUi6VJgV2ApcClwb8GlXwT8UtLuZJcTGgBsCOwG3BIRH6Z9TEnPa5NdHPJ/s946AFYv0qGYtcjJxqx4ngO+VbsQESemVsvMFPqgoOx3gX7A8IhYlq5GvUbtpo3sezWy+6sMa/dam7UDn7MxK54HgDUkHV8QW7OJsuuQ3V9nmaQ9gSEp/jDwDUm9JH0O+BpAuhfRa5IOhWwwgqTtcjkKszZwsjErksiuensw8BVJr0l6nOx2wqc2UvxaoFLSTLJWzotpH08A1wNPkd2L6O8F23wXGC3pH2StqJGYdRC+6rOZmeXOLRszM8udk42ZmeXOycbMzHLnZGNmZrlzsjEzs9w52ZiZWe6cbMzMLHf/D9oz+QpNColmAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Grade</th>\n",
       "      <th>Salary</th>\n",
       "      <th>fx</th>\n",
       "      <th>error</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>50</td>\n",
       "      <td>50000</td>\n",
       "      <td>70075.255242</td>\n",
       "      <td>20075.255242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>50</td>\n",
       "      <td>54000</td>\n",
       "      <td>70075.255242</td>\n",
       "      <td>16075.255242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46</td>\n",
       "      <td>50000</td>\n",
       "      <td>64010.703700</td>\n",
       "      <td>14010.703700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>95</td>\n",
       "      <td>189000</td>\n",
       "      <td>138301.460094</td>\n",
       "      <td>-50698.539906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>50</td>\n",
       "      <td>55000</td>\n",
       "      <td>70075.255242</td>\n",
       "      <td>15075.255242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>40000</td>\n",
       "      <td>1849.050390</td>\n",
       "      <td>-38150.949610</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>57</td>\n",
       "      <td>59000</td>\n",
       "      <td>80688.220441</td>\n",
       "      <td>21688.220441</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>42</td>\n",
       "      <td>42000</td>\n",
       "      <td>57946.152157</td>\n",
       "      <td>15946.152157</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>26</td>\n",
       "      <td>47000</td>\n",
       "      <td>33687.945987</td>\n",
       "      <td>-13312.054013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>72</td>\n",
       "      <td>78000</td>\n",
       "      <td>103430.288725</td>\n",
       "      <td>25430.288725</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>78</td>\n",
       "      <td>119000</td>\n",
       "      <td>112527.116039</td>\n",
       "      <td>-6472.883961</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>60</td>\n",
       "      <td>95000</td>\n",
       "      <td>85236.634098</td>\n",
       "      <td>-9763.365902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>40</td>\n",
       "      <td>49000</td>\n",
       "      <td>54913.876386</td>\n",
       "      <td>5913.876386</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>17</td>\n",
       "      <td>29000</td>\n",
       "      <td>20042.705017</td>\n",
       "      <td>-8957.294983</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>85</td>\n",
       "      <td>130000</td>\n",
       "      <td>123140.081238</td>\n",
       "      <td>-6859.918762</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Grade  Salary             fx         error\n",
       "0      50   50000   70075.255242  20075.255242\n",
       "1      50   54000   70075.255242  16075.255242\n",
       "2      46   50000   64010.703700  14010.703700\n",
       "3      95  189000  138301.460094 -50698.539906\n",
       "4      50   55000   70075.255242  15075.255242\n",
       "5       5   40000    1849.050390 -38150.949610\n",
       "6      57   59000   80688.220441  21688.220441\n",
       "7      42   42000   57946.152157  15946.152157\n",
       "8      26   47000   33687.945987 -13312.054013\n",
       "9      72   78000  103430.288725  25430.288725\n",
       "10     78  119000  112527.116039  -6472.883961\n",
       "11     60   95000   85236.634098  -9763.365902\n",
       "12     40   49000   54913.876386   5913.876386\n",
       "13     17   29000   20042.705017  -8957.294983\n",
       "14     85  130000  123140.081238  -6859.918762"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "# Calculate least squares regression line\n",
    "df['x2'] = df['Grade']**2\n",
    "df['xy'] = df['Grade'] * df['Salary']\n",
    "x = df['Grade'].sum()\n",
    "y = df['Salary'].sum()\n",
    "x2 = df['x2'].sum()\n",
    "xy = df['xy'].sum()\n",
    "n = df['Grade'].count()\n",
    "m = ((n*xy) - (x*y))/((n*x2)-(x**2))\n",
    "b = (y - (m*x))/n\n",
    "df['fx'] = (m*df['Grade']) + b\n",
    "df['error'] = df['fx'] - df['Salary']\n",
    "\n",
    "print('slope: ' + str(m))\n",
    "print('y-intercept: ' + str(b))\n",
    "\n",
    "# Create a scatter plot of Grade vs Salary\n",
    "df.plot(kind='scatter', title='Grade vs Salary Regression', x='Grade', y='Salary', color='red')\n",
    "\n",
    "# Plot the regression line\n",
    "plt.plot(df['Grade'],df['fx'])\n",
    "\n",
    "plt.show()\n",
    "\n",
    "# Show the original x,y values, the f(x) value, and the error\n",
    "df[['Grade', 'Salary', 'fx', 'error']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this case, we used Python expressions to calculate the *slope* and *y-intercept* using the same approach and formula as before. In practice, Python provides great support for statistical operations like this; and you can use the ***linregress*** function in the *scipy.stats* package to retrieve the *slope* and *y-intercept* (as well as the *correlation*, *p-value*, and *standard error*) for a matched array of *x* and *y* values (we'll discuss *p-values* later!).\n",
    "\n",
    "Here's the Python code to calculate the regression line variables using the ***linregress*** function:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "slope: 1516.1378856076406\n",
      "y-intercept: -5731.639038313733\n"
     ]
    },
    {
     "data": {
      "image/png": "iVB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0k/VTSS5LuA7YoiH9e0l2pxfR3SVsW9ejMmuFfUGbFszXwRDPrvwRsGxELUuvmGxGxWFJfYJqkKWTXJzuM7Crd3dP+ai8eOh44LiJelrQT8EeyBGdWck42ZiUi6VJgV2ApcClwb8GlXwT8UtLuZJcTGgBsCOwG3BIRH6Z9TEnPa5NdHPJ/s946AFYv0qGYtcjJxqx4ngO+VbsQESemVsvMFPqgoOx3gX7A8IhYlq5GvUbtpo3sezWy+6sMa/dam7UDn7MxK54HgDUkHV8QW7OJsuuQ3V9nmaQ9gSEp/jDwDUm9JH0O+BpAuhfRa5IOhWwwgqTtcjkKszZwsjErksiuensw8BVJr0l6nOx2wqc2UvxaoFLSTLJWzotpH08A1wNPkd2L6O8F23wXGC3pH2StqJGYdRC+6rOZmeXOLRszM8udk42ZmeXOycbMzHLnZGNmZrlzsjEzs9w52ZiZWe6cbMzMLHf/D9oz+QpNColmAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Grade</th>\n",
       "      <th>Salary</th>\n",
       "      <th>fx</th>\n",
       "      <th>error</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>50</td>\n",
       "      <td>50000</td>\n",
       "      <td>70075.255242</td>\n",
       "      <td>20075.255242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>50</td>\n",
       "      <td>54000</td>\n",
       "      <td>70075.255242</td>\n",
       "      <td>16075.255242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46</td>\n",
       "      <td>50000</td>\n",
       "      <td>64010.703700</td>\n",
       "      <td>14010.703700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>95</td>\n",
       "      <td>189000</td>\n",
       "      <td>138301.460094</td>\n",
       "      <td>-50698.539906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>50</td>\n",
       "      <td>55000</td>\n",
       "      <td>70075.255242</td>\n",
       "      <td>15075.255242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>40000</td>\n",
       "      <td>1849.050390</td>\n",
       "      <td>-38150.949610</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>57</td>\n",
       "      <td>59000</td>\n",
       "      <td>80688.220441</td>\n",
       "      <td>21688.220441</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>42</td>\n",
       "      <td>42000</td>\n",
       "      <td>57946.152157</td>\n",
       "      <td>15946.152157</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>26</td>\n",
       "      <td>47000</td>\n",
       "      <td>33687.945987</td>\n",
       "      <td>-13312.054013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>72</td>\n",
       "      <td>78000</td>\n",
       "      <td>103430.288725</td>\n",
       "      <td>25430.288725</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>78</td>\n",
       "      <td>119000</td>\n",
       "      <td>112527.116039</td>\n",
       "      <td>-6472.883961</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>60</td>\n",
       "      <td>95000</td>\n",
       "      <td>85236.634098</td>\n",
       "      <td>-9763.365902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>40</td>\n",
       "      <td>49000</td>\n",
       "      <td>54913.876386</td>\n",
       "      <td>5913.876386</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>17</td>\n",
       "      <td>29000</td>\n",
       "      <td>20042.705017</td>\n",
       "      <td>-8957.294983</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>85</td>\n",
       "      <td>130000</td>\n",
       "      <td>123140.081238</td>\n",
       "      <td>-6859.918762</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Grade  Salary             fx         error\n",
       "0      50   50000   70075.255242  20075.255242\n",
       "1      50   54000   70075.255242  16075.255242\n",
       "2      46   50000   64010.703700  14010.703700\n",
       "3      95  189000  138301.460094 -50698.539906\n",
       "4      50   55000   70075.255242  15075.255242\n",
       "5       5   40000    1849.050390 -38150.949610\n",
       "6      57   59000   80688.220441  21688.220441\n",
       "7      42   42000   57946.152157  15946.152157\n",
       "8      26   47000   33687.945987 -13312.054013\n",
       "9      72   78000  103430.288725  25430.288725\n",
       "10     78  119000  112527.116039  -6472.883961\n",
       "11     60   95000   85236.634098  -9763.365902\n",
       "12     40   49000   54913.876386   5913.876386\n",
       "13     17   29000   20042.705017  -8957.294983\n",
       "14     85  130000  123140.081238  -6859.918762"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "from scipy import stats\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "# Get the regression line slope and intercept\n",
    "m, b, r, p, se = stats.linregress(df['Grade'], df['Salary'])\n",
    "\n",
    "df['fx'] = (m*df['Grade']) + b\n",
    "df['error'] = df['fx'] - df['Salary']\n",
    "\n",
    "print('slope: ' + str(m))\n",
    "print('y-intercept: ' + str(b))\n",
    "\n",
    "# Create a scatter plot of Grade vs Salary\n",
    "df.plot(kind='scatter', title='Grade vs Salary Regression', x='Grade', y='Salary', color='red')\n",
    "\n",
    "# Plot the regression line\n",
    "plt.plot(df['Grade'],df['fx'])\n",
    "\n",
    "plt.show()\n",
    "\n",
    "# Show the original x,y values, the f(x) value, and the error\n",
    "df[['Grade', 'Salary', 'fx', 'error']]\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that the *slope* and *y-intercept* values are the same as when we worked them out using the formula.\n",
    "\n",
    "Similarly to the simple study hours example, the regression line doesn't fit the outliers very well. In this case, the extremes include a student who scored only 5, and a student who scored 95. Let's see what happens if we remove these students from our sample:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "slope: 1424.5008823224111\n",
      "y-intercept: -7822.237984844818\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZsAAAEWCAYAAACwtjr+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpY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Nk/Qk2Z21f9RI8xuAGknjyXo5k9M+ngZuAp4h+3ykRwu2+SowRNJ/yXpRgzCrEL7rs5mZlZx7NmZmVnIuNmZmVnIuNmZmVnIuNmZmVnIuNmZmVnIuNmZmVnIuNmZmVnL/H69F7Cm1Sl5CAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Grade</th>\n",
       "      <th>Salary</th>\n",
       "      <th>fx</th>\n",
       "      <th>error</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>50</td>\n",
       "      <td>50000</td>\n",
       "      <td>63402.806131</td>\n",
       "      <td>13402.806131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>50</td>\n",
       "      <td>54000</td>\n",
       "      <td>63402.806131</td>\n",
       "      <td>9402.806131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46</td>\n",
       "      <td>50000</td>\n",
       "      <td>57704.802602</td>\n",
       "      <td>7704.802602</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>50</td>\n",
       "      <td>55000</td>\n",
       "      <td>63402.806131</td>\n",
       "      <td>8402.806131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>57</td>\n",
       "      <td>59000</td>\n",
       "      <td>73374.312308</td>\n",
       "      <td>14374.312308</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>42</td>\n",
       "      <td>42000</td>\n",
       "      <td>52006.799073</td>\n",
       "      <td>10006.799073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>26</td>\n",
       "      <td>47000</td>\n",
       "      <td>29214.784956</td>\n",
       "      <td>-17785.215044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>72</td>\n",
       "      <td>78000</td>\n",
       "      <td>94741.825542</td>\n",
       "      <td>16741.825542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>78</td>\n",
       "      <td>119000</td>\n",
       "      <td>103288.830836</td>\n",
       "      <td>-15711.169164</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>60</td>\n",
       "      <td>95000</td>\n",
       "      <td>77647.814954</td>\n",
       "      <td>-17352.185046</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>40</td>\n",
       "      <td>49000</td>\n",
       "      <td>49157.797308</td>\n",
       "      <td>157.797308</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>17</td>\n",
       "      <td>29000</td>\n",
       "      <td>16394.277015</td>\n",
       "      <td>-12605.722985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>85</td>\n",
       "      <td>130000</td>\n",
       "      <td>113260.337013</td>\n",
       "      <td>-16739.662987</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Grade  Salary             fx         error\n",
       "0      50   50000   63402.806131  13402.806131\n",
       "1      50   54000   63402.806131   9402.806131\n",
       "2      46   50000   57704.802602   7704.802602\n",
       "4      50   55000   63402.806131   8402.806131\n",
       "6      57   59000   73374.312308  14374.312308\n",
       "7      42   42000   52006.799073  10006.799073\n",
       "8      26   47000   29214.784956 -17785.215044\n",
       "9      72   78000   94741.825542  16741.825542\n",
       "10     78  119000  103288.830836 -15711.169164\n",
       "11     60   95000   77647.814954 -17352.185046\n",
       "12     40   49000   49157.797308    157.797308\n",
       "13     17   29000   16394.277015 -12605.722985\n",
       "14     85  130000  113260.337013 -16739.662987"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "from scipy import stats\n",
    "\n",
    "df = pd.DataFrame({'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],\n",
    "                   'Salary':[50000,54000,50000,189000,55000,40000,59000,42000,47000,78000,119000,95000,49000,29000,130000],\n",
    "                   'Hours':[41,40,36,17,35,39,40,45,41,35,30,33,38,47,24],\n",
    "                   'Grade':[50,50,46,95,50,5,57,42,26,72,78,60,40,17,85]})\n",
    "\n",
    "df = df[(df['Grade'] > 5) & (df['Grade'] < 95)]\n",
    "\n",
    "# Get the regression line slope and intercept\n",
    "m, b, r, p, se = stats.linregress(df['Grade'], df['Salary'])\n",
    "\n",
    "df['fx'] = (m*df['Grade']) + b\n",
    "df['error'] = df['fx'] - df['Salary']\n",
    "\n",
    "print('slope: ' + str(m))\n",
    "print('y-intercept: ' + str(b))\n",
    "\n",
    "# Create a scatter plot of Grade vs Salary\n",
    "df.plot(kind='scatter', title='Grade vs Salary Regression', x='Grade', y='Salary', color='red')\n",
    "\n",
    "# Plot the regression line\n",
    "plt.plot(df['Grade'],df['fx'])\n",
    "\n",
    "plt.show()\n",
    "\n",
    "# Show the original x,y values, the f(x) value, and the error\n",
    "df[['Grade', 'Salary', 'fx', 'error']]\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "With the outliers removed, the line is a slightly better overall fit to the data.\n",
    "\n",
    "One of the neat things about regression is that it gives us a formula and some constant values that we can use to estimate a *y* value for any *x* value. We just need to apply the linear function using the *slope* and *y-intercept* values we've calculated from our sample data. For example, suppose a student named Fabio graduates from our school with a final grade of **62**. We can use our linear function with the *slope* and *y-intercept* values we calculated with Python to estimate what salary he can expect to earn:\n",
    "\n",
    "\\begin{equation}f(x) = (1424.50\\times62) - 7822.24 \\approx 80,497 \\end{equation}\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
